import { Component, OnInit } from '@angular/core';
import { DataService } from 'src/app/service/data.service';

@Component({
  selector: 'app-snack',
  templateUrl: './snack.component.html',
  styleUrls: ['./snack.component.css']
})
export class SnackComponent implements OnInit {
  menu = []
  windowHeight: number = window.innerHeight
  menuHeight: number = 0
  constructor(private dataService: DataService) { }

  ngOnInit(): void {
    let that = this
    this.menuHeight = this.windowHeight - 150
    this.dataService.getDishes('snack', dishes => that.menu = dishes)
  }
}
